package com.how2java.service.impl;

import com.how2java.mapper.UserMapper;
import com.how2java.pojo.User;
import com.how2java.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    public UserMapper userMapper;
    @Override
    public String getPassword(String name) {
        User u = userMapper.getByName(name);
        if (null == u){
            return null;
        }else {
            return u.getPassword();
        }
    }
}
